home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / linux / howto.installation < prev    next >
Encoding:
Text File  |  1995-07-25  |  59.6 KB  |  1,505 lines

  1. Subject: Linux Installation HOWTO
  2. Newsgroups: comp.os.linux.announce,comp.os.linux.help,comp.os.linux.admin,news.answers,comp.answers
  3. From: mdw@sunsite.unc.edu (Matt Welsh)
  4. Date: Fri, 18 Nov 1994 17:08:11 GMT
  5.  
  6. Archive-name: linux/howto/installation
  7. Last-modified: 27 Oct 94
  8.  
  9.   The Linux Installation HOWTO
  10.   by Matt Welsh, mdw@sunsite.unc.edu
  11.   v3.2, 27 October 1994
  12.  
  13.   This document describes how to obtain and install the Linux software,
  14.   focusing on the popular Slackware distribution (version 2.0). It is
  15.   the first document which a new Linux user should read to get started.
  16.  
  17.   1.  Introduction
  18.  
  19.   Linux is a freely-distributable implementation of UNIX for 80386 and
  20.   80486 machines. It supports a wide range of software, including X
  21.   Windows, Emacs, TCP/IP networking (including SLIP), the works.  This
  22.   document assumes that you have heard of and know about Linux, and just
  23.   want to sit down and install it.
  24.  
  25.  
  26.  
  27.   1.1.  Other sources of information
  28.  
  29.   If you have never heard of Linux before, there are several sources of
  30.   basic information about the system. One is the Linux Frequently Asked
  31.   Questions list (FAQ), available from
  32.   sunsite.unc.edu:/pub/Linux/docs/FAQ. This document contains many
  33.   common questions (and answers!) about Linux---it is a ``must read''
  34.   for new users.
  35.  
  36.   In the directory /pub/Linux/docs on sunsite.unc.edu you'll find a
  37.   number of other documents about Linux, including the Linux INFO-SHEET
  38.   and META-FAQ, both of which you should read.  Also take a look at the
  39.   USENET newsgroups comp.os.linux.help and comp.os.linux.announce.
  40.  
  41.   Another source of online Linux documentation is the Linux HOWTO
  42.   archive, on sunsite.unc.edu:/pub/Linux/docs/HOWTO. The file HOWTO-
  43.   INDEX in that directory explains what Linux HOWTOs are available.
  44.  
  45.   The Linux Documentation Project is writing a set of manuals and books
  46.   about Linux, all of which are freely distributable on the net.  The
  47.   directory /pub/Linux/docs/LDP on sunsite.unc.edu contains the current
  48.   set of LDP manuals.
  49.  
  50.   The book ``Linux Installation and Getting Started'' is a complete
  51.   guide to getting and installing Linux, as well as how to use the
  52.   system once you've installed it. It contains a complete tutorial to
  53.   using and running the system, and much more information than is
  54.   contained here. This HOWTO is simply a condensation of some of the
  55.   most important information in that book. You can get ``Linux
  56.   Installation and Getting Started'' from sunsite.unc.edu in
  57.   /pub/Linux/docs/LDP/install-guide.  The README file there describes
  58.   how you can order a printed copy of the book (about 180 pages).
  59.  
  60.  
  61.  
  62.   1.2.  New versions of this document
  63.  
  64.   New versions of the Linux Installation HOWTO will be periodically
  65.   posted to comp.os.linux.announce, comp.os.linux, and news.answers.
  66.   They will also be uploaded to various Linux FTP sites, including
  67.   sunsite.unc.edu:/pub/Linux/docs/HOWTO.
  68.  
  69.  
  70.  
  71.   1.3.  Feedback
  72.  
  73.   If you have questions or comments about this document, please feel
  74.   free to mail Matt Welsh, at mdw@sunsite.unc.edu. I welcome any
  75.   suggestions, criticism, or postcards. If you find a mistake with this
  76.   document, please let me know so I can correct it in the next version.
  77.   Thanks.
  78.  
  79.  
  80.   2.  Hardware Requirements
  81.  
  82.   What kind of system is needed to run Linux? This is a good question;
  83.   the actual hardware requirements for the system change periodically.
  84.   The Linux Hardware-HOWTO gives a (more or less) complete listing of
  85.   hardware supported by Linux. The Linux INFO-SHEET provides another
  86.   list.
  87.  
  88.   At the very least, a hardware configuration that looks like the
  89.   following is required:
  90.  
  91.   Any ISA, EISA or VESA Local Bus 80386 or 80486 system will do.
  92.   Currently, the MicroChannel (MCA) architecture (found on IBM PS/2
  93.   machines) is not supported.  Any CPU from the 386SX to the 486DX2 will
  94.   work. You do not need a math coprocessor, although it is nice to have
  95.   one.
  96.  
  97.   You need at least 4 megabytes of memory in your machine. Technically,
  98.   Linux will run with only 2 megs, but most installations and software
  99.   require 4. The more memory you have, the happier you'll be. I suggest
  100.   8 or 16 megabytes if you're planning to use X-Windows.
  101.  
  102.   Of course, you'll need a hard drive and an AT-standard drive
  103.   controller. All MFM, RLL, and IDE drives and controllers should work.
  104.   Many SCSI drives and adaptors are supported as well; the Linux SCSI-
  105.   HOWTO contains more information on SCSI.
  106.  
  107.   Linux can actually run on a single 5.25" HD floppy, but that's only
  108.   useful for installation and maintenance.
  109.  
  110.   Free space on your hard drive is needed as well. The amount of space
  111.   needed depends on how much software you plan to install. Most
  112.   installations require somewhere in the ballpark of 40 to 80 megs.
  113.   This includes space for the software, swap space (used as virtual RAM
  114.   on your machine), and free space for users, and so on.
  115.  
  116.   It's conceivable that you could run a minimal Linux system in 10 megs
  117.   or less, and it's conceivable that you could use well over 100 megs or
  118.   more for all of your Linux software. The amount varies greatly
  119.   depending on the amount of software you install and how much space you
  120.   require. More about this later.
  121.  
  122.   Linux will co-exist with other operating systems, such as MS-DOS,
  123.   Microsoft Windows, or OS/2, on your hard drive. (In fact you can even
  124.   access MS-DOS files and run some MS-DOS programs from Linux.)  In
  125.   other words, when partitioning your drive for Linux, MS-DOS or OS/2
  126.   live on their own partitions, and Linux exists on its own. We'll go
  127.   into more detail later.
  128.  
  129.   You do NOT need to be running MS-DOS, OS/2, or any other operating
  130.   system to use Linux. Linux is a completely different, stand-alone
  131.   operating system and does not rely on other OS's for installation and
  132.   use.
  133.  
  134.   You also need a Hercules, CGA, EGA, VGA, or Super VGA video card and
  135.   monitor.  In general, if your video card and monitor work under MS-DOS
  136.   then it should work under Linux. However, if you wish to run X
  137.   Windows, there are other restrictions on the supported video hardware.
  138.   The Linux XFree86-HOWTO contains more information about running X and
  139.   its requirements.
  140.  
  141.   In all, the minimal setup for Linux is not much more than is required
  142.   for most MS-DOS or MS Windows systems sold today. If you have a 386 or
  143.   486 with at least 4 megs of RAM, then you'll be happy running Linux.
  144.   Linux does not require huge amounts of diskspace, memory, or processor
  145.   speed. I (used to) run Linux on a 386/16 MHz (the slowest machine you
  146.   can get) with 4 megs of RAM, and was quite happy. The more you want to
  147.   do, the more memory (and faster processor) you'll need. In my
  148.   experience a 486 with 16 megabytes of RAM running Linux outdoes
  149.   several models of workstation.
  150.  
  151.  
  152.  
  153.   3.  Getting Linux
  154.  
  155.   In this section we'll cover how to obtain the Linux software.
  156.  
  157.  
  158.   3.1.  Linux Distributions
  159.  
  160.   Before you can install Linux, you need to decide on one of the
  161.   ``distributions'' of Linux which are available. There is no single,
  162.   standard release of the Linux software---there are many such releases.
  163.   Each release has its own documentation and installation instructions.
  164.  
  165.   Linux distributions are available both via anonymous FTP and via mail
  166.   order on diskette, tape, and CD-ROM. The Linux Distribution HOWTO (see
  167.   sunsite.unc.edu in the file /pub/Linux/docs/HOWTO/Distribution-HOWTO)
  168.   includes a list of many Linux distributions available via FTP and mail
  169.   order.
  170.  
  171.   The release of Linux covered in this HOWTO is the Slackware
  172.   distribution, maintained by Patrick J. Volkerding
  173.   (volkerdi@mhd1.moorhead.msus.edu). It is one of the most popular
  174.   distributions available; it is very up-to-date and includes a good
  175.   amount of software including X-Windows, TeX, and others.  The
  176.   Slackware distribution consists of a number of ``disk sets'', each one
  177.   containing a particular type of software (for example, the d disk set
  178.   contains development tools such as the gcc compiler, and so forth).
  179.   You can elect to install whatever disk sets you like, and can easily
  180.   install new ones later.
  181.  
  182.   Slackware is also easy to install; it is very self-explanatory.  (So
  183.   self-explanatory, in fact, that this HOWTO may not be necessary.)
  184.  
  185.   The version of Slackware described here is 2.0.0, of 25 June 1994.
  186.   Installation of later versions of Slackware should be very similar to
  187.   the information given here.
  188.  
  189.   Information on other releases can be found in the Linux Installation
  190.   and Getting Started manual from the LDP. You can also find other
  191.   releases of Linux on various FTP sites, including
  192.   sunsite.unc.edu:/pub/Linux/distributions See the Distribution-HOWTO
  193.   (mentioned above) for details.
  194.  
  195.   The instructions here should be general enough to be applicable to
  196.   releases other than Slackware. I hate to be biased towards a single
  197.   release, but I don't have time to keep up with them all! And Slackware
  198.   appears to have what most Linux users are looking for.
  199.  
  200.  
  201.  
  202.   3.2.  Slackware Space Requirements
  203.  
  204.   Unfortunately, Slackware does not maintain a complete list of
  205.   diskspace requirements for each disk set. You need at least 7
  206.   megabytes to install just the A series of disks; a very rough estimate
  207.   of the required diskspace would be 2 or 2.5 megabytes per disk.
  208.  
  209.   The following disk sets are available:
  210.  
  211.      A  The base system. Enough to get up and running and have elvis and
  212.         comm programs available. Based around the 1.0.9 Linux kernel,
  213.         and the new filesystem standard (FSSTND).
  214.  
  215.         These disks are known to fit on 1.2M disks, although the rest of
  216.         Slackware won't. If you have only a 1.2M floppy, you can still
  217.         install the base system, download other disks you want and
  218.         install them from your hard drive.
  219.  
  220.  
  221.      AP Various applications and add ons, such as the manual pages,
  222.         groff, ispell (GNU and international versions), term, joe, jove,
  223.         ghostscript, sc, bc, and the quota patches.
  224.  
  225.  
  226.      D  Program development. GCC/G++/Objective C 2.5.8, make (GNU and
  227.         BSD), byacc and GNU bison, flex, the 4.5.26 C libraries, gdb,
  228.         kernel source for 1.0.9, SVGAlib, ncurses, clisp, f2c, p2c, m4,
  229.         perl, rcs.
  230.  
  231.  
  232.      E  GNU Emacs 19.25.
  233.  
  234.  
  235.      F  A collection of FAQs and other documentation.
  236.  
  237.  
  238.      I  Info pages for GNU software. Documentation for various programs
  239.         readable by info or Emacs.
  240.  
  241.  
  242.      N  Networking. TCP/IP, UUCP, mailx, dip, deliver, elm, pine, smail,
  243.         cnews, nn, tin, trn.
  244.  
  245.  
  246.      OOP
  247.         Object Oriented Programming. GNU Smalltalk 1.1.1, and the
  248.         Smalltalk Interface to X (STIX).
  249.  
  250.  
  251.      Q  Alpha kernel source and images (currently contains Linux
  252.         1.1.18).
  253.  
  254.  
  255.      TCL
  256.         Tcl, Tk, TclX, blt, itcl.
  257.  
  258.  
  259.      Y  Games. The BSD games collection, and Tetris for terminals.
  260.  
  261.  
  262.      X  The base XFree86 2.1.1 system, with libXpm, fvwm 1.20, and xlock
  263.         added.
  264.  
  265.  
  266.      XAP
  267.         X applications: X11 ghostscript, libgr13, seyon, workman,
  268.         xfilemanager, xv 3.01, GNU chess and xboard, xfm 1.2, ghostview,
  269.         and various X games.
  270.  
  271.  
  272.  
  273.      XD X11 program development. X11 libraries, server linkkit, PEX
  274.         support.
  275.  
  276.  
  277.      XV Xview 3.2 release 5. XView libraries, and the Open Look virtual
  278.         and non-virtual window managers.
  279.  
  280.  
  281.      IV Interviews libraries, include files, and the doc and idraw apps.
  282.         These run unreasonably slow on my machine, but they might still
  283.         be worth looking at.
  284.  
  285.  
  286.      OI ParcPlace's Object Builder 2.0 and Object Interface Library 4.0,
  287.         generously made available for Linux developers according to the
  288.         terms in the "copying" notice found in these directories. Note
  289.         that these only work with libc-4.4.4, but a new version may be
  290.         released once gcc 2.5.9 is available.
  291.  
  292.  
  293.      T  The TeX and LaTeX2e text formatting systems.
  294.  
  295.  
  296.   You must get the ``a'' disk set; the rest are optional.  I suggest at
  297.   least installing the a, ap, and d sets, as well as the x set if you
  298.   plan to run X Windows.
  299.  
  300.  
  301.   3.3.  Getting Slackware via Mail Order
  302.  
  303.   Slackware is available for free from the Internet, as well as via mail
  304.   order (if you don't have Internet access, or don't want to take the
  305.   time to download it yourself). The next section describes how to
  306.   download Slackware from the Internet.
  307.  
  308.   The various mail order distributors for Slackware (and other Linux
  309.   distributions) are listed in the Linux Distribution HOWTO, from
  310.   sunsite.unc.edu in the directory /pub/Linux/docs/HOWTO.
  311.  
  312.  
  313.   3.4.  Getting Slackware from the Internet
  314.  
  315.   The Slackware release of Linux may be found on any number of FTP sites
  316.   worldwide. The Linux META-FAQ lists several of the Linux FTP sites; we
  317.   suggest that you try to find the software on the FTP site nearest you,
  318.   to reduce net traffic. However, two of the major Linux FTP sites are
  319.   sunsite.unc.edu and tsx-11.mit.edu.
  320.  
  321.   The Slackware release may be found on the following FTP sites:
  322.  
  323.   o  sunsite.unc.edu:/pub/Linux/distributions/slackware
  324.  
  325.   o  tsx-11.mit.edu:/pub/linux/packages/slackware
  326.  
  327.   o  ftp.cdrom.com:/pub/linux/slackware
  328.  
  329.      ftp.cdrom.com is Slackware's home site.
  330.  
  331.  
  332.   3.4.1.  Downloading the files
  333.  
  334.   You need to download the following files from the FTP sites listed
  335.   above. Make sure that you use binary mode when FTPing them!
  336.  
  337.  
  338.  
  339.   o  The various README files, as well as SLACKWARE_FAQ.  Be sure to
  340.      read these files before attempting to install the software, to get
  341.      any updates or changes to this document.
  342.  
  343.   o  A bootdisk image. This is a file that you will write to a floppy to
  344.      create the Slackware boot disk. If you have a 1.44 megabyte boot
  345.      floppy (3.5"), look in the directory bootdsks.144.  If you have a
  346.      1.2 megabyte boot floppy (5.25"), look in the directory
  347.      bootdsks.12.  The README files in these directories describes what
  348.      the files are.
  349.  
  350.      You need one of the following files. (The file READ.ME in these
  351.      directories contains an up-to-date list of boot disk images.)
  352.  
  353.   o  bare.gz. This is a boot floppy that has only IDE hard drive
  354.      drivers. (No SCSI, CD-ROM, or networking support.)  Use this if you
  355.      only have an IDE hard drive controller and aren't going to be
  356.      installing over the network or from CD-ROM.
  357.  
  358.   o  xt.gz. This is a boot floppy with IDE and XT hard drive support.
  359.  
  360.   o  cd.gz. Contains IDE hard drive and non-SCSI CD-ROM drivers.  Get
  361.      this if you're going to be installing from a (non-SCSI) CD-ROM
  362.      (only relevant if you bought a Slackware CD-ROM of some kind).
  363.  
  364.   o  cdscsi.gz. Contains IDE and SCSI hard drive support, and non-SCSI
  365.      CD-ROM drivers.
  366.  
  367.  
  368.   o  scsi.gz. Contains IDE and SCSI hard drive support, and SCSI CD-ROM
  369.      drivers.
  370.  
  371.   o  net.gz. Contains IDE hard drive and TCP/IP networking support. Get
  372.      this if you are going to install over the network using NFS.
  373.  
  374.   o  scsinet.gz. Contains IDE and SCSI hard drive support, SCSI CD-ROM
  375.      drivers, and TCP/IP networking support.  You might want to try this
  376.      one first; use bare.gz or one of the other boot floppies if this
  377.      doesn't work for you.
  378.  
  379.      You need only one of the above bootdisk images, depending on the
  380.      type hardware that you have in your system.
  381.  
  382.      The issue here is that some hardware drivers conflict with each
  383.      other in strange ways, and instead of attempting to debug hardware
  384.      problems on your system it's easier to use a boot floppy image with
  385.      only certain drivers enabled. Most users should try scsi.gz or
  386.      bare.gz.
  387.  
  388.   o  A rootdisk image. This is a file that you will write to a floppy to
  389.      create the Slackware installation disk. As with the bootdisk image,
  390.      look in rootdsks.144 or rootdsks.12 depending on the type of boot
  391.      floppy drive that you have.
  392.  
  393.      You need one of the following files:
  394.  
  395.   o  color144.gz. The menu-based color installation disk for 1.44 meg
  396.      drives. Most users should use this rootdisk.
  397.  
  398.   o  umsds144.gz. A version of the color144 disk for installing with the
  399.      UMSDOS filesystem, which allows you to install Linux onto a
  400.      directory of an MS-DOS filesystem. This installation method is not
  401.      discussed in detail here, but it will prevent you from having to
  402.      repartition your drive. More on this later.
  403.  
  404.  
  405.   o  tty144.gz. The terminal-based installation disk for 1.44 meg
  406.      drives. You should use color144.gz, but a few people have reported
  407.      problems with it on their system. If color144.gz doesn't work for
  408.      you, try tty144.gz instead.  It is a bit dated and the installation
  409.      procedure isn't identical, but it should work if color144.gz
  410.      doesn't.
  411.  
  412.   o  colrlite.gz. The menu-based color installation disk for 1.2 meg
  413.      drives. Some things have been trimmed off of this disk to make it
  414.      fit on a 1.2 meg floppy, but it should work if you only have a 1.2
  415.      meg drive.
  416.  
  417.  
  418.   o  umsds12.gz. A version of the colrlite disk for installing with the
  419.      UMSDOS filesystem. See the description of umsds144.gz, above.
  420.  
  421.   o  tty12.gz. The terminal-based installation disk for 1.2 meg drives.
  422.      Use this rootdisk if you have a 1.2 meg boot floppy and colrlite.gz
  423.      doesn't work for you.
  424.  
  425.      Again, you need only one of the above rootdisk images, depending on
  426.      the type of boot floppy drive that you have.
  427.  
  428.   o  GZIP.EXE. This is an MS-DOS executable of the gzip compression
  429.      program used to compress the boot and rootdisk files (the .gz
  430.      extension on the filenames indicates this). This can be found in
  431.      the install directory.
  432.  
  433.   o  RAWRITE.EXE. This is an MS-DOS program that will write the contents
  434.      of a file (such as the boot and rootdisk images) directly to a
  435.      floppy, without regard to format. You will use RAWRITE.EXE to
  436.      create the boot and root floppies.  This can be found in the
  437.      install directory as well.
  438.  
  439.      You only need RAWRITE.EXE and GZIP.EXE if you plan to create the
  440.      boot and root floppies from an MS-DOS system. If you have access to
  441.      a UNIX workstation with a floppy drive instead, you can create the
  442.      floppies from there, using the dd command.  See the man page for dd
  443.      and ask your local UNIX gurus for assistance.
  444.  
  445.   o  The files in the directories slakware/a1, slakware/a2, and
  446.      slakware/a3.  These files make up the ``a'' disk set of the
  447.      Slackware distribution. They are required. Later, you will copy
  448.      these files to MS-DOS floppies for installation (or, you can
  449.      install from your hard drive). Therefore, when you download these
  450.      files, keep them in separate directories; don't mix the a1 files
  451.      with the a2 files, and so on.
  452.  
  453.      Be sure that you get the files without periods in the filenames as
  454.      well. That is, within FTP, use the command ``mget *'' instead of
  455.      ``mget *.*''.
  456.  
  457.   o  The files in the directories ap1, ap2, etc., depending on what disk
  458.      sets you are installing. For example, if you are installing the
  459.      ``x'' disk series, get the files in the directories x1 through x5.
  460.      As with the ``a'' disk set, above, be sure to keep the files in
  461.      separate directories when you download them.
  462.  
  463.  
  464.   3.4.2.  Installation methods
  465.  
  466.   Slackware provides several different means of installing the software.
  467.   The most popular is installing from an MS-DOS partition on your hard
  468.   drive; the other is to install from a set of MS-DOS floppies created
  469.   from the disk sets that you downloaded.
  470.  
  471.   You can also install Slackware from an NFS-mounted filesystem over a
  472.   TCP/IP network. This is somewhat involved, however, and a discussion
  473.   of how to do this is out of the range of this document. If you need
  474.   help, ask your local UNIX gurus how to set up your system to mount an
  475.   NFS filesystem which you can install Slackware from. (For this, you'll
  476.   need another system on the network which has Slackware available on an
  477.   exported filesystem.)
  478.  
  479.   First we'll describe how to create the boot and root floppies, and
  480.   then we'll describe how to set things up for either a hard drive or
  481.   floppy installation.
  482.  
  483.  
  484.   3.4.2.1.  Creating the boot and root floppies
  485.  
  486.   You must create floppies from the bootdisk and rootdisk images that
  487.   you downloaded, no matter what type of installation you will be doing.
  488.   This is where the MS-DOS programs GZIP.EXE and RAWRITE.EXE come into
  489.   play.
  490.  
  491.   First you must uncompress the bootdisk and rootdisk images using
  492.   GZIP.EXE (on an MS-DOS system, of course). For example, if you're
  493.   using the bare.gz bootdisk image, issue the MS-DOS command:
  494.  
  495.        C:\> GZIP -D BARE.GZ
  496.  
  497.  
  498.   which will uncompress bare.gz and leave you with the file bare. You
  499.   must similarly uncompress the rootdisk image. For example, if you are
  500.   using the rootdisk color144.gz, issue the command:
  501.  
  502.        C:\> GZIP -D COLOR144.GZ
  503.  
  504.  
  505.   which will uncompress the file and leave you with color144.
  506.  
  507.   Next, you must have two high-density MS-DOS formatted floppies.  (They
  508.   must be of the same type; that is, if your boot floppy drive is a 3.5"
  509.   drive, both floppies must be high-density 3.5" disks.) You will use
  510.   RAWRITE.EXE to write the boot and rootdisk images to the floppies.
  511.  
  512.   For example, if you're using the bare.gz bootdisk, use the command:
  513.  
  514.        C:\> RAWRITE
  515.  
  516.  
  517.   Answer the prompts for the name of the file to write (such as BARE-
  518.   BOOT) and the floppy to write it to (such as A:). RAWRITE will copy
  519.   the file, block-by-block, directly to the floppy. Also use RAWRITE for
  520.   the root disk image (such as COLOR144). When you're done, you'll have
  521.   two floppies: one containing the boot disk, the other containing the
  522.   root disk. Note that these two floppies will no longer be readable by
  523.   MS-DOS (they are ``Linux format'' floppies, in some sense).
  524.  
  525.   Be sure that you're using brand-new, error-free floppies. The floppies
  526.   must have no bad blocks on them.
  527.  
  528.   Note that you do not need to be running MS-DOS in order to install
  529.   Slackware. However, running MS-DOS makes it easier to create the boot
  530.   and root floppies, and it makes it easier to install the software (as
  531.   you can install directly from an MS-DOS partition on your system). If
  532.   you are not running MS-DOS on your system, you can use someone else's
  533.   MS-DOS system just to create the floppies, and install from there.
  534.  
  535.   It is not necessary to use GZIP.EXE and RAWRITE.EXE under MS-DOS to
  536.   create the boot and root floppies, either. You can use the gzip and dd
  537.   commands on a UNIX system to do the same job.  (For this, you will
  538.   need a UNIX workstation with a floppy drive, of course.) For example,
  539.   on a Sun workstation with the floppy drive on device /dev/rfd0, you
  540.   can use the commands:
  541.  
  542.  
  543.        $ gunzip bare.gz
  544.        $ dd if=bare of=/dev/rfd0 obs=18k
  545.  
  546.  
  547.  
  548.  
  549.   You must provide the appropriate block size argument (the obs argu-
  550.   ment) on some workstations (e.g., Suns) or this will fail. If you have
  551.   problems the man page for dd will be instructive.
  552.  
  553.  
  554.   3.4.2.2.  Preparing for installation from hard drive
  555.  
  556.   If you're planning on installing the Slackware software directly from
  557.   the hard drive (which is much faster and more reliable than a floppy
  558.   installation), you will need an MS-DOS partition on the system that
  559.   you're installing Slackware to. (That is, you must already be running
  560.   MS-DOS on the system.)
  561.  
  562.   Note: If you plan to install Slackware from an MS-DOS partition, that
  563.   partition must NOT be compressed with DoubleSpace, Stacker, or any
  564.   other MS-DOS drive compression utility. Linux cannot currently read
  565.   DoubleSpace/Stacker MS-DOS partitions directly. (You can access them
  566.   via the MS-DOS Emulator, but that is not an option when installing the
  567.   Linux software.)
  568.  
  569.   To prepare for hard drive installation, simply create a directory on
  570.   the hard drive to store the Slackware files. For example,
  571.  
  572.        C:\> MKDIR SLACKWAR
  573.  
  574.  
  575.   will create the directory C:\SLACKWAR to hold the Slackware files.
  576.   Under this directory, you should create the subdirectories A1, A2, and
  577.   so on, for each disk set that you downloaded. All of the files from
  578.   the A1 disk should go into the directory SLACKWAR\A1, and so forth.
  579.  
  580.   Now you're ready to go on and install the software; skip to the
  581.   section ``Installing the Software''.
  582.  
  583.  
  584.   3.4.2.3.  Preparing for floppy installation
  585.  
  586.   If you wish to install Slackware from floppies instead of the hard
  587.   drive, you'll need to have one blank, MS-DOS formatted floppy for each
  588.   Slackware disk that you downloaded. These disks must be high-density
  589.   format.
  590.  
  591.   The A disk set (disks A1 through A3) may be either 3.5" or 5.25"
  592.   floppies. However, the rest of the disk sets must be 3.5" disks.
  593.   Therefore, if you only have a 5.25" floppy drive, you'll need to
  594.   borrow a 3.5" drive from someone in order to install disk sets other
  595.   than A. (Or, you can install from the hard drive, as explained in the
  596.   previous section.)
  597.  
  598.   To make the disks, simply copy the files from each Slackware directory
  599.   onto an MS-DOS formatted floppy, using the MS-DOS COPY command. As so:
  600.  
  601.        C:\> COPY A1\*.* A:
  602.  
  603.   will copy the contents of the A1 disk to the floppy in drive A:.  You
  604.   should repeat this for each disk that you downloaded.
  605.  
  606.   You do not need to modify or uncompress the files on the disks in any
  607.   way; you merely need to copy them to MS-DOS floppies. The Slackware
  608.   installation procedure takes care of uncompressing the files for you.
  609.  
  610.  
  611.   4.  Installing the Software
  612.  
  613.   In this section we'll describe how to prepare your system for
  614.   installing Slackware, and finally how to go about installing it.
  615.  
  616.  
  617.   4.1.  Repartitioning
  618.  
  619.   On most systems, the hard drive is already dedicated to partitions for
  620.   MS-DOS, OS/2, and so on.  You need to resize these partitions in order
  621.   to make space for Linux.
  622.  
  623.   NOTE: If you use one of the umsds root diskettes, you can install
  624.   Slackware TO a directory on your MS-DOS partition. (This is different
  625.   than installing FROM an MS-DOS partition.) Instead, you use the
  626.   ``UMSDOS filesystem'', which allows you to treat a directory of your
  627.   MS-DOS partition as a Linux filesystem. In this way, you don't have to
  628.   repartition your drive.
  629.  
  630.   I only suggest using this method if your drive has four partitions and
  631.   repartitioning would be more trouble than it's worth. Or, if you want
  632.   to try Slackware out before repartitioning, this is a good way to do
  633.   so. But in most cases you should repartition, as described here. If
  634.   you do plan to use UMSDOS, you are on your own---it is not documented
  635.   in detail here. From now on, we assume that you are NOT using UMSDOS,
  636.   and that you will be repartitioning.
  637.  
  638.   A partition is just a section of the hard drive set aside for a
  639.   particular operating system to use. If you only have MS-DOS installed,
  640.   your hard drive probably has just one partition, entirely for MS-DOS.
  641.   To use Linux, however, you'll need to repartition the drive, so that
  642.   you have one partition for MS-DOS, and one (or more) for Linux.
  643.  
  644.   Partitions come in three flavors: primary, extended, and logical.
  645.   Briefly, primary partitions are one of the four main partitions on
  646.   your drive. However, if you wish to have more than four partitions per
  647.   drive, you need to create an extended partition, which can contain
  648.   many logical partitions.  You don't store data directly on an extended
  649.   partition---it is used only as a container for logical partitions.
  650.   Data is stored only on either primary or logical partitions.
  651.  
  652.   To put this another way, most people use only primary partitions.
  653.   However, if you need more than four partitions on a drive, you create
  654.   an extended partition. Logical partitions are then created on top of
  655.   the extended partition, and there you have it---more than four
  656.   partitions per drive.
  657.  
  658.   Note that you can easily install Linux on the second drive on your
  659.   system (known as D: to MS-DOS). You simply specify the appropriate
  660.   device name when creating Linux partitions. This is described in
  661.   detail below.
  662.  
  663.   Back to repartitioning your drive: The problem with resizing
  664.   partitions is that there is no way to do it (easily) without deleting
  665.   the data on those partitions.  Therefore, you will need to make a full
  666.   backup of your system before repartitioning. In order to resize a
  667.   partition, we simply delete the partition(s), and re-create them with
  668.   smaller sizes.
  669.   NOTE: There is a non-destructive disk repartitioner available for MS-
  670.   DOS, called FIPS. Look on sunsite.unc.edu in the directory
  671.   /pub/Linux/system/Install. With FIPS, a disk optimizer (such as Norton
  672.   Speed Disk), and a little bit of luck, you should be able to resize
  673.   MS-DOS partitions without destroying the data on them.  It's still
  674.   suggested that you make a full backup before attempting this.
  675.  
  676.   If you're not using FIPS, however, the classic way to modify
  677.   partitions is with the program FDISK. For example, let's say that you
  678.   have an 80 meg hard drive, dedicated to MS-DOS. You'd like to split it
  679.   in half---40 megs for MS-DOS and 40 megs for Linux. In order to do
  680.   this, you run FDISK under MS-DOS, delete the 80 meg MS-DOS partition,
  681.   and re-create a 40 meg MS-DOS partition in its place. You can then
  682.   format the new partition and reinstall your MS-DOS software from
  683.   backups. 40 megabytes of the drive is left empty. Later, you create
  684.   Linux partitions on the unused portion of the drive.
  685.  
  686.   In short, you should do the following to resize MS-DOS partitions with
  687.   FDISK:
  688.  
  689.   1. Make a full backup of your system.
  690.  
  691.   2. Create an MS-DOS bootable floppy, using a command such as
  692.  
  693.        FORMAT /S A:
  694.  
  695.  
  696.   3. Copy the files FDISK.EXE and FORMAT.COM to this floppy, as well as
  697.      any other utilities that you need. (For example, utilities to
  698.      recover your system from backup.)
  699.  
  700.   4. Boot the MS-DOS system floppy.
  701.  
  702.   5. Run FDISK, possibly specifying the drive to modify (such as C: or
  703.      D:).
  704.  
  705.   6. Use the FDISK menu options to delete the partitions which you wish
  706.      to resize. This will destroy all data on the affected partitions.
  707.  
  708.   7. Use the FDISK menu options to re-create those partitions, with
  709.      smaller sizes.
  710.  
  711.   8. Exit FDISK and re-format the new partitions with the FORMAT
  712.      command.
  713.  
  714.   9. Restore the original files from backup.
  715.  
  716.   Note that MS-DOS FDISK will give you an option to create a ``logical
  717.   DOS drive''. A logical DOS drive is just a logical partition on your
  718.   hard drive. You can install Linux on a logical partition, but you
  719.   don't want to create that logical partition with MS-DOS fdisk. So, if
  720.   you're currently using a logical DOS drive, and want to install Linux
  721.   in its place, you should delete the logical drive with MS-DOS FDISK,
  722.   and (later) create a logical partition for Linux in its place.
  723.  
  724.   The mechanism used to repartition for OS/2 and other operating systems
  725.   is similar. See the documentation for those operating systems for
  726.   details.
  727.  
  728.  
  729.  
  730.   4.2.  Creating partitions for Linux
  731.  
  732.   After repartitioning your drive, you need to create partitions for
  733.   Linux. Before describing how to do that, we'll talk about partitions
  734.   and filesystems under Linux.
  735.   4.2.1.  Filesystems and swap space
  736.  
  737.   Linux requires at least one partition, for the root filesystem, which
  738.   will hold the Linux software itself.
  739.  
  740.   You can think of a filesystem as a partition formatted for Linux.
  741.   Filesystems are used to hold files. Every system must have a root
  742.   filesystem, at least. However, many users prefer to use multiple
  743.   filesystems---one for each major part of the directory tree. For
  744.   example, you may wish to create a separate filesystem to hold all
  745.   files under the /usr directory.  (Note that on UNIX systems, forward
  746.   slashes are used to delimit directories, not backslashes as with MS-
  747.   DOS.) In this case you have both a root filesystem, and a /usr
  748.   filesystem.
  749.  
  750.   Each filesystem requires its own partition. Therefore, if you're using
  751.   both root and /usr filesystems, you'll need to create two Linux
  752.   partitions.
  753.  
  754.   In addition, most users create a swap partition, which is used for
  755.   virtual RAM. If you have, say, 4 megabytes of memory on your machine,
  756.   and a 10-megabyte swap partition, as far as Linux is concerned you
  757.   have 14 megabytes of virtual memory.
  758.  
  759.   When using swap space, Linux moves unused pages of memory out to disk,
  760.   allowing you to run more applications at once on your system.
  761.   However, because swapping is often slow, it's no replacement for real
  762.   physical RAM. But applications that require a great deal of memory
  763.   (such as the X Window System) often rely on swap space if you don't
  764.   have enough physical RAM.
  765.  
  766.   Nearly all Linux users employ a swap partition.  If you have 4
  767.   megabytes of RAM or less, a swap partition is required to install the
  768.   software. It is strongly recommended that you have a swap partition
  769.   anyway, unless you have a great amount of physical RAM.
  770.  
  771.   The size of your swap partition depends on how much virtual memory you
  772.   need. It's often suggested that you have at least 16 megabytes of
  773.   virtual memory total. Therefore, if you have 8 megs of physical RAM,
  774.   you might want to create an 8-megabyte swap partition.  Note that swap
  775.   partitions can be no larger than 128 megabytes in size. Therefore, if
  776.   you need more than 128 megs of swap, you must create multiple swap
  777.   partitions. You may have up to 16 swap partitions in all.
  778.  
  779.  
  780.   4.2.2.  Booting the installation disk
  781.  
  782.  
  783.   4.2.2.1.  Specifying hardware parameters
  784.  
  785.   The first step is to boot the Slackware bootdisk. After the system
  786.   boots, you will see the message:
  787.  
  788.  
  789.        Welcome to the Slackware Linux 2.0.0 Bootkernel disk!
  790.  
  791.  
  792.  
  793.  
  794.   Here, you are given the opportunity to specify various hardware param-
  795.   eters, such as your SCSI controller IRQ and address, or drive geome-
  796.   try, before booting the Linux kernel.  This is necessary in case Linux
  797.   does not detect your SCSI controller or hard drive geometry, for exam-
  798.   ple.
  799.  
  800.  
  801.   In particular, many BIOS-less SCSI controllers require you to specify
  802.   the port address and IRQ at boot time. Likewise, IBM PS/1, ThinkPad,
  803.   and ValuePoint machines do not store drive geometry in the CMOS, and
  804.   you must specify it at boot time.
  805.  
  806.   To try booting the kernel without any special parameters, just press
  807.   enter at the boot prompt.
  808.  
  809.   Watch the messages as the system boots. If you have a SCSI controller,
  810.   you should see a listing of the SCSI hosts detected.  If you see the
  811.   message
  812.  
  813.  
  814.        SCSI: 0 hosts
  815.  
  816.  
  817.  
  818.  
  819.   Then your SCSI controller was not detected, and you will have to use
  820.   the following procedure.
  821.  
  822.   Also, the system will display information on the drive partitions and
  823.   devices detected. If any of this information is incorrect or missing,
  824.   you will have to force hardware detection.
  825.  
  826.   On the other hand, if all goes well and you hardware seems to be
  827.   detected, you can skip to the following section, ``Loading the root
  828.   disk.''
  829.  
  830.   To force hardware detection, you must enter the appropriate parameters
  831.   at the boot prompt, using the following syntax:
  832.  
  833.  
  834.        ramdisk <parameters...>
  835.  
  836.  
  837.  
  838.  
  839.   There are a number of such parameters available; here are some of the
  840.   most common.
  841.  
  842.   o  hd=cylinders,heads,sectors Specify the drive geometry.  Required
  843.      for systems such as the IBM PS/1, ValuePoint, and ThinkPad.  For
  844.      example, if your drive has 683 cylinders, 16 heads, and 32 sectors
  845.      per track, enter
  846.  
  847.  
  848.        ramdisk hd=683,16,32
  849.  
  850.  
  851.  
  852.  
  853.   o  tmc8xx=memaddr,irq Specify address and IRQ for BIOS-less Future
  854.      Domain TMC-8xx SCSI controller. For example,
  855.  
  856.  
  857.        ramdisk tmc8xx=0xca000,5
  858.  
  859.  
  860.  
  861.  
  862.   Note that the 0x prefix must be used for all values given in hex. This
  863.   is true for all of the following options.
  864.  
  865.   o  st0x=memaddr,irq Specify address and IRQ for BIOS-less Seagate ST02
  866.      controller.
  867.   o  t128=memaddr,irq Specify address and IRQ for BIOS-less Trantor
  868.      T128B controller.
  869.  
  870.   o  ncr5380=port,irq,dma Specify port, IRQ, and DMA channel for generic
  871.      NCR5380 controller.
  872.  
  873.   o  aha152x=port,irq,scsi_id,1 Specify port, IRQ, and SCSI ID for BIOS-
  874.      less AIC-6260 controllers. This includes Adaptec 1510, 152x, and
  875.      Soundblaster-SCSI controllers.
  876.  
  877.      For each of these, you must enter `ramdisk' followed by the
  878.      parameter that you wish to use.
  879.  
  880.   If you have questions about these boot-time options, please read the
  881.   Linux SCSI HOWTO, which should be available on any Linux FTP archive
  882.   site (or from wherever you obtained this document).  The SCSI HOWTO
  883.   explains Linux SCSI compatibility in much more detail.
  884.  
  885.  
  886.   4.2.2.2.  Loading the rootdisk
  887.  
  888.   After booting the kernel, you will be prompted to enter the Slackware
  889.   root disk:
  890.  
  891.  
  892.        Please remove the boot kernel disk from your floppy drive,
  893.        insert a disk to be loaded into the ramdisk, and press
  894.        [enter] to continue.
  895.  
  896.  
  897.  
  898.  
  899.   At this point you should remove the bootdisk from the drive and insert
  900.   the rootdisk. Then press enter to go on.
  901.  
  902.   The rootdisk will be loaded into memory, and you should be presented
  903.   with a login prompt. Login as ``root''.
  904.  
  905.  
  906.        slackware login: root
  907.        #
  908.  
  909.  
  910.  
  911.  
  912.  
  913.   4.2.3.  Using fdisk
  914.  
  915.   To create Linux partitions, we'll use the Linux version of the fdisk
  916.   program. After logging in as root, run the command
  917.  
  918.        fdisk <drive>
  919.  
  920.  
  921.   where <drive> is the name of the drive that you wish to create Linux
  922.   partitions on. Hard drive device names are:
  923.  
  924.   o  /dev/hda First IDE drive
  925.  
  926.   o  /dev/hdb Second IDE drive
  927.  
  928.   o  /dev/sda First SCSI drive
  929.  
  930.   o  /dev/sdb Second SCSI drive
  931.  
  932.      For example, to create Linux partitions on the first SCSI drive in
  933.      your system, use the command
  934.  
  935.        fdisk /dev/sda
  936.  
  937.  
  938.   If you use fdisk without an argument, it will assume /dev/hda.
  939.  
  940.   To create Linux partitions on the second drive on your system, simply
  941.   specify either /dev/hdb (for IDE drives) or /dev/sdb (for SCSI drives)
  942.   when running fdisk.
  943.  
  944.   Your Linux partitions don't all have to be on the same drive.  You
  945.   might want to create your root filesystem partition on /dev/hda and
  946.   your swap partition on /dev/hdb, for example. In order to do so just
  947.   run fdisk once for each drive.
  948.  
  949.   Use of fdisk is simple. The command ``p'' displays your current
  950.   partition table. ``n'' creates a new partition, and ``d'' deletes a
  951.   partition.
  952.  
  953.   To Linux, partitions are given a name based on the drive which they
  954.   belong to. For example, the first partition on the drive /dev/hda is
  955.   /dev/hda1, the second is /dev/hda2, and so on. If you have any logical
  956.   partitions, they are numbered starting with /dev/hda5, /dev/hda6 and
  957.   so on up.
  958.  
  959.   NOTE: You should not create or delete partitions for operating systems
  960.   other than Linux with Linux fdisk. That is, don't create or delete MS-
  961.   DOS partitions with this version of fdisk; use MS-DOS's version of
  962.   FDISK instead. If you try to create MS-DOS partitions with Linux
  963.   fdisk, chances are MS-DOS will not recognize the partition and not
  964.   boot correctly.
  965.  
  966.   Here's an example of using fdisk. Here, we have a single MS-DOS
  967.   partition using 61693 blocks on the drive, and the rest of the drive
  968.   is free for Linux. (Under Linux, one block is 1024 bytes. Therefore,
  969.   61693 blocks is about 61 megabytes.)  We will create two Linux
  970.   partitions: one for swap, and one for the root filesystem.
  971.  
  972.   First, we use the ``p'' command to display the current partition
  973.   table.  As you can see, /dev/hda1 (the first partition on /dev/hda) is
  974.   a DOS partition of 61693 blocks.
  975.  
  976.   ______________________________________________________________________
  977.   Command (m for help):   p
  978.   Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
  979.   Units = cylinders of 608 * 512 bytes
  980.  
  981.        Device Boot  Begin   Start     End  Blocks   Id  System
  982.     /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M
  983.  
  984.   Command (m for help):
  985.   ______________________________________________________________________
  986.  
  987.  
  988.  
  989.   Next, we use the ``n'' command to create a new partition. The Linux
  990.   root partition will be 80 megs in size.
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.   ______________________________________________________________________
  1000.   Command (m for help):  n
  1001.   Command action
  1002.       e   extended
  1003.       p   primary partition (1-4)
  1004.   p
  1005.   ______________________________________________________________________
  1006.  
  1007.  
  1008.   Here we're being asked if we want to create an extended or primary
  1009.   partition. In most cases you want to use primary partitions, unless
  1010.   you need more than four partitions on a drive. See the section
  1011.   ``Repartitioning'', above, for more information.
  1012.  
  1013.   ______________________________________________________________________
  1014.   Partition number (1-4): 2
  1015.   First cylinder (204-683):  204
  1016.   Last cylinder or +size or +sizeM or +sizeK (204-683): +80M
  1017.   ______________________________________________________________________
  1018.  
  1019.  
  1020.  
  1021.   The first cylinder should be the cylinder AFTER where the last
  1022.   partition left off. In this case, /dev/hda1 ended on cylinder 203, so
  1023.   we start the new partition at cylinder 204.
  1024.  
  1025.   As you can see, if we use the notation ``+80M'', it specifies a
  1026.   partition of 80 megs in size. Likewise, the notation ``+80K'' would
  1027.   specify an 80 kilobyte partition, and ``+80'' would specify just an 80
  1028.   byte partition.
  1029.  
  1030.   ______________________________________________________________________
  1031.   Warning: Linux cannot currently use 33090 sectors of this partition
  1032.   ______________________________________________________________________
  1033.  
  1034.  
  1035.   If you see this warning, you can ignore it. It is left over from an
  1036.   old restriction that Linux filesystems could only be 64 megs in size.
  1037.   However, with newer filesystem types, that is no longer the case...
  1038.   partitions can now be up to 4 terabytes in size.
  1039.  
  1040.   Next, we create our 10 megabyte swap partition, /dev/hda3.
  1041.  
  1042.   ______________________________________________________________________
  1043.   Command (m for help): n
  1044.   Command action
  1045.       e   extended
  1046.       p   primary partition (1-4)
  1047.   p
  1048.  
  1049.   Partition number (1-4): 3
  1050.   First cylinder (474-683):  474
  1051.   Last cylinder or +size or +sizeM or +sizeK (474-683):  +10M
  1052.   ______________________________________________________________________
  1053.  
  1054.  
  1055.  
  1056.   Again, we display the contents of the partition table. Be sure to
  1057.   write down the information here, especially the size of each partition
  1058.   in blocks. You need this information later.
  1059.  
  1060.  
  1061.  
  1062.  
  1063.  
  1064.  
  1065.   ______________________________________________________________________
  1066.   Command (m for help): p
  1067.   Disk /dev/hda: 16 heads, 38 sectors, 683 cylinders
  1068.   Units = cylinders of 608 * 512 bytes
  1069.  
  1070.        Device Boot  Begin   Start     End  Blocks   Id  System
  1071.     /dev/hda1   *       1       1     203   61693    6  DOS 16-bit >=32M
  1072.     /dev/hda2         204     204     473   82080   83  Linux native
  1073.     /dev/hda3         474     474     507   10336   83  Linux native
  1074.   ______________________________________________________________________
  1075.  
  1076.  
  1077.  
  1078.   Note that the Linux swap partition (here, /dev/hda3) has type ``Linux
  1079.   native''. We need to change the type of the swap partition to ``Linux
  1080.   swap'' so that the installation program will recognize it as such. In
  1081.   order to do this, use the fdisk ``t'' command:
  1082.  
  1083.   ______________________________________________________________________
  1084.   Command (m for help): t
  1085.   Partition number (1-4): 3
  1086.   Hex code (type L to list codes): 82
  1087.   ______________________________________________________________________
  1088.  
  1089.  
  1090.   If you use ``L'' to list the type codes, you'll find that 82 is the
  1091.   type corresponding to Linux swap.
  1092.  
  1093.   To quit fdisk and save the changes to the partition table, use the
  1094.   ``w'' command. To quit fdisk WITHOUT saving changes, use the ``q''
  1095.   command.
  1096.  
  1097.   After quitting fdisk, the system may tell you to reboot to make sure
  1098.   that the changes took effect. In general there is no reason to reboot
  1099.   after using fdisk---the version of fdisk on the Slackware distribution
  1100.   is smart enough to update the partitions without rebooting.
  1101.  
  1102.  
  1103.   4.3.  Preparing the swap space
  1104.  
  1105.   If you have 4 megabytes of RAM (or less) in your machine, you need to
  1106.   create a swap partition (using fdisk) and enable it for use before
  1107.   installing the software. Here, we describe how to format and enable
  1108.   your swap partition(s).
  1109.  
  1110.   If you have more than 4 megs of RAM, you need only create your
  1111.   partition(s)---it's not necessary to format and enable them before
  1112.   installing the software.  In this case you can skip down to the
  1113.   section ``Installing the Software''.
  1114.  
  1115.   If you get any ``out of memory'' errors during the installation
  1116.   procedure you should create a swap partition and enable it as
  1117.   described here.
  1118.  
  1119.   To prepare the swap space for use, we use the mkswap command.  It
  1120.   takes the form:
  1121.  
  1122.        mkswap -c <partition> <size>
  1123.  
  1124.  
  1125.   where <partition> is the partition name, such as /dev/hda3, and <size>
  1126.   is the size of the partition in blocks.
  1127.  
  1128.   For example, if you created the swap partition /dev/hda3 of size 10336
  1129.   blocks, use the command
  1130.  
  1131.   mkswap -c /dev/hda3 10336
  1132.  
  1133.  
  1134.   The -c option tells mkswap to check for bad blocks on the partition
  1135.   when preparing the swap space. If you see any ``read_intr'' error mes-
  1136.   sages during the mkswap operation, this means that bad blocks were
  1137.   found (and flagged). So you can ignore these errors.
  1138.  
  1139.   To enable swapping on the new device, use the command
  1140.  
  1141.        swapon <partition>
  1142.  
  1143.  
  1144.   For example, for our swap space on /dev/hda3, we use
  1145.  
  1146.        swapon /dev/hda3
  1147.  
  1148.  
  1149.   We're now swapping with about 10 megabytes more virtual memory.
  1150.  
  1151.   You should execute mkswap and swapon for each swap partition that you
  1152.   created.
  1153.  
  1154.  
  1155.   4.4.  Installing the software
  1156.  
  1157.   Installing the Slackware release is very simple; it's almost
  1158.   automatic. You use the setup command, which guides you through a
  1159.   series of menus which allow you to specify the means of installation,
  1160.   the partitions to use, and so forth.  Almost everything is automatic.
  1161.  
  1162.   Here, we're not going to document many of the specifics of using
  1163.   setup, because it changes from time to time. setup is very self-
  1164.   explanatory; it contains its own documentation. Just to give you an
  1165.   idea of what it's like, however, we'll describe what most
  1166.   installations are like using setup.
  1167.  
  1168.   Before you begin, be sure that you have a high-density MS-DOS
  1169.   formatted floppy on hand. You will use this floppy to create a Linux
  1170.   boot diskette.
  1171.  
  1172.   After running fdisk (and, perhaps, mkswap and swapon as described
  1173.   above), issue the command
  1174.  
  1175.        # setup
  1176.  
  1177.  
  1178.   This will present you with a colourful menu with various options such
  1179.   as ``Addswap'' (to set up your swap space), ``Source'' (to specify the
  1180.   source of the software to install, such as floppy or hard drive),
  1181.   ``Target'' (to specify where to install the software), and so on.
  1182.  
  1183.   In general, you should go through the menu commands in the following
  1184.   order:
  1185.  
  1186.   1. Addswap. If you created a swap partition (using fdisk), use the
  1187.      addswap menu option to tell the system about it.  This option will
  1188.      present you with a list of possible swap partitions; just type in
  1189.      the name of the swap partition(s) that you wish to use (such as
  1190.      /dev/hda3). The system will then ask you if you want to format the
  1191.      swap partition, which you should do unless you already ran mkswap
  1192.      and swapon on it.  That is, you should format the swap partition
  1193.      unless you already formatted and enabled it by hand as described in
  1194.      the previous section.
  1195.  
  1196.  
  1197.   2. Source. This menu option lets you specify the source for the
  1198.      software to install. You can select several means of installation,
  1199.      such as from floppy or from hard drive. If you are installing from
  1200.      floppies, the system will ask you which floppy drive to use. If you
  1201.      are installing from hard drive, the system will ask you what
  1202.      partition the files are stored on, and what directory they are in.
  1203.  
  1204.      For example, if you are installing from an MS-DOS partition on your
  1205.      hard drive, and the Slackware files are under the directory
  1206.      C:\SLACKWAR, you should enter the name of the MS-DOS partition
  1207.      (such as /dev/hda1) and the name of the directory (such as
  1208.      /slackwar). Note that you should use forward slashes (/), not
  1209.      backslashes (\), in the directory name.
  1210.  
  1211.      There are other means of installation, such as CD-ROM. These should
  1212.      be self-explanatory as well.
  1213.  
  1214.   3. Target. This menu item lets you specify what partition(s) to
  1215.      install the software on. The system will display a list of possible
  1216.      partitions. First you will be asked to enter the name of the root
  1217.      partition, such as /dev/hda2. You will be asked if you want to
  1218.      format the partition; unless you are installing on a partition
  1219.      previously formatted for Linux you should do so. You should use the
  1220.      Second Extended Filesystem (ext2fs) type for the partition.
  1221.  
  1222.      You will also be given a chance to use additional partitions for
  1223.      different parts of the directory tree. For example, if you created
  1224.      a separate partition for the /usr filesystem, you should enter the
  1225.      name of that partition and the directory that it corresponds to
  1226.      (/usr) when asked.
  1227.  
  1228.   4. Disksets. This option allows you to specify the disksets you wish
  1229.      to install. Use the arrow keys to scroll through the list; pressing
  1230.      the spacebar selects or deselects a set. Press return when you're
  1231.      done selecting disk sets.
  1232.  
  1233.      You may wish to only install a minimal system at this time. That's
  1234.      fine. Only the A diskset is required. After you have installed the
  1235.      software you may run setup to install other disksets.
  1236.  
  1237.   5. Install. After setting up all of the parameters above, you're ready
  1238.      to install the software. First the system will ask you what type of
  1239.      prompting to use; you should use the ``normal'' prompting method
  1240.      (unless you're an expert and have modified the installation
  1241.      tagfiles in some way).
  1242.  
  1243.      The system will simply go through each disk set and install the
  1244.      software. For each software package, a dialog box will be displayed
  1245.      describing the software. Software packages that are required will
  1246.      be installed automatically. For optional software packages you will
  1247.      be given the option of either installing or not installing the
  1248.      package. (If you don't wish to install a certain package now, you
  1249.      can always use setup on your system to install it later).
  1250.  
  1251.      While the software is installing, watch out for error messages that
  1252.      may be displayed. The most common error that you're likely to run
  1253.      into is ``device full'', which means that you have run out of space
  1254.      on your Linux partitions. Unfortunately, the Slackware installation
  1255.      procedure is not quite smart enough to detect this, and will
  1256.      attempt to continue installing the software regardless. If you get
  1257.      any kind of error messages during the installation procedure, you
  1258.      may wish to break out of the installation program (using Ctrl-C) to
  1259.      record them. The only solution for the ``device full'' problem is
  1260.      to re-create your Linux partitions with different sizes, or attempt
  1261.      to reinstall the software without several of the optional software
  1262.      packages.
  1263.   4.5.  After installation
  1264.  
  1265.   After installation is complete, and if all goes well, you will be
  1266.   given the option of creating a ``standard boot disk'', which you can
  1267.   use to boot your newly-installed Linux system. For this you will need
  1268.   a blank, high-density MS-DOS formatted diskette of the type that you
  1269.   boot with on your system. Simply insert the disk when prompted and a
  1270.   boot diskette will be created.
  1271.  
  1272.   You will also be given the chance to install LILO on your hard drive.
  1273.   LILO (which stands for LInux LOader) is a program that will allow you
  1274.   to boot Linux (as well as other operating systems, such as MS-DOS)
  1275.   from your hard drive. If you wish to do this, just select the
  1276.   appropriate menu option and follow the prompts.
  1277.  
  1278.   If you are using OS/2's Boot Manager, the menu will include an option
  1279.   for configuring LILO for use with the Boot Manager, so that you can
  1280.   boot Linux from it.
  1281.  
  1282.   Note that this automated LILO installation procedure is not foolproof;
  1283.   there are situations in which this can fail. Be sure that you have a
  1284.   way to boot MS-DOS, Linux, and other operating systems from floppy
  1285.   before you attempt to install LILO. If the LILO installation fails you
  1286.   will be able to boot your system from floppy and correct the problem.
  1287.  
  1288.   More information on configuring LILO is given below.
  1289.  
  1290.   The postinstallation procedure will also take you through several menu
  1291.   items allowing you to configure your system. This includes specifying
  1292.   your modem and mouse device, as well as your time zone. Just follow
  1293.   the menu options.
  1294.  
  1295.  
  1296.   4.6.  Booting your new system
  1297.  
  1298.   If everything went as planned, you should be able to boot your Linux
  1299.   boot floppy (not the Slackware installation floppy, but the floppy
  1300.   created after installing the software). Or, if you installed LILO, you
  1301.   should be able to boot from the hard drive.  After booting, login as
  1302.   root. Congratulations! You have your very own Linux system.
  1303.  
  1304.   If you are booting using LILO, try holding down shift or control
  1305.   during boot. This will present you with a boot prompt; press tab to
  1306.   see a list of options. In this way you can boot Linux, MS-DOS, or
  1307.   whatever directly from LILO.
  1308.  
  1309.   After booting your system and logging in as root, one of the first
  1310.   things you should do is create an account for yourself.  The adduser
  1311.   command may be used for this purpose. For example,
  1312.  
  1313.  
  1314.        # adduser
  1315.        Login to add (^C to quit): ebersol
  1316.        Full Name: Norbert Ebersol
  1317.        GID [100]: 100
  1318.        UID [501]: 501
  1319.        Home Directory [/home/ebersol]: /home/ebersol
  1320.        Shell [/bin/bash]: /bin/bash
  1321.        Password [ebersol]: new.password
  1322.  
  1323.        Information for new user [ebersol]:
  1324.        Home directory: [/home/ebersol]  Shell: [/bin/bash]
  1325.        Password: [new.password]  UID: [502] GID:[100]
  1326.        Is this correct? [y/n]: y
  1327.  
  1328.  
  1329.   adduser will prompt you for various parameters, such as the username,
  1330.   full name, GID (group ID), UID (user ID), and so on. For the most part
  1331.   you can use the defaults. If you're unfamiliar with creating users on
  1332.   a UNIX system, I strongly suggest getting a book on UNIX systems
  1333.   administration. It will help you greatly in setting up and using your
  1334.   new system.
  1335.  
  1336.   You can now login as the new user. You can use the keys Alt-F1 through
  1337.   Alt-F8 to switch between virtual consoles, which will allow you to
  1338.   login multiple times from the console. The passwd command can be used
  1339.   to set the passwords on your new accounts; you should set a password
  1340.   for root and any new users that you create.
  1341.  
  1342.   Also, the hostname of your machine is set at boot time in the file
  1343.   /etc/rc.d/rc.M. You should edit this file (as root) to change the
  1344.   hostname of the machine.  You should edit the lines in this file which
  1345.   run the commands hostname or hostname_notcp. (The default hostname is
  1346.   slackware.) You may also wish to edit the domainname commands in this
  1347.   file, if you are on a TCP/IP network.
  1348.  
  1349.   Obviously, there are many more things to setup and configure. A good
  1350.   book on UNIX systems administration should help. (I suggest Essential
  1351.   Systems Administration from O'Reilly and Associates.)  You will pick
  1352.   these things up as time goes by. You should read various other Linux
  1353.   HOWTOs, such as the NET-2-HOWTO and Printing-HOWTO, for information on
  1354.   other configuration tasks.
  1355.  
  1356.   After that, the system is all yours... have fun!
  1357.  
  1358.  
  1359.   5.  Configuring LILO
  1360.  
  1361.   LILO is a boot loader, which can be used to select either Linux, MS-
  1362.   DOS, or some other operating system at boot time. If you install LILO
  1363.   as the primary boot loader, it will handle the first-stage booting
  1364.   process for all operating systems on your drive. This works well if
  1365.   MS-DOS is the only other operating system that you have installed.
  1366.   However, you might be running OS/2, which has it's own Boot Manager.
  1367.   In this case, you want OS/2's Boot Manager to be the primary boot
  1368.   loader, and use LILO just to boot Linux (as the secondary boot
  1369.   loader).
  1370.  
  1371.   The Slackware installation procedure allows you to install and
  1372.   configure LILO. However, this method doesn't seem to be smart enough
  1373.   to handle several peculiar situations. It might be easier in some
  1374.   cases to configure LILO by hand.
  1375.  
  1376.   In order to set up LILO for your system, just edit the file
  1377.   /etc/lilo.conf. Below we present an example of a LILO configuration
  1378.   file, where the Linux root partition is on /dev/hda2, and MS-DOS is
  1379.   installed on /dev/hdb1 (on the second hard drive).
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.   # Tell LILO to install itself as the primary boot loader on /dev/hda.
  1396.   boot = /dev/hda
  1397.   # The boot image to install; you probably shouldn't change this
  1398.   install = /boot/boot.b
  1399.   # Do some optimization. Doesn't work on all systems.
  1400.   compact
  1401.  
  1402.   # The stanza for booting Linux.
  1403.   image = /vmlinuz       # The kernel is in /vmlinuz
  1404.     label = linux        # Give it the name "linux"
  1405.     root = /dev/hda2     # Use /dev/hda2 as the root filesystem
  1406.     vga = ask            # Prompt for VGA mode
  1407.     append = "aha152x=0x340,11,7,1"  # Add this to the boot options,
  1408.                                      # for detecting the SCSI controller
  1409.  
  1410.   # The stanza for booting MS-DOS
  1411.   other = /dev/hdb1      # This is the MS-DOS partition
  1412.     label = msdos        # Give it the name "msdos"
  1413.     table = /dev/hdb     # The partition table for the second drive
  1414.  
  1415.  
  1416.  
  1417.  
  1418.   Once you have edited the /etc/lilo.conf file, run /sbin/lilo as root.
  1419.   This will install LILO on your drive. Note that you must rerun
  1420.   /sbin/lilo anytime that you recompile your kernel (something that you
  1421.   don't need to worry about just now, but keep it in mind).
  1422.  
  1423.   Note how we use the append option in /etc/lilo.conf to specify boot
  1424.   parameters as we did when booting the Slackware bootdisk.
  1425.  
  1426.   You can now reboot your system from the hard drive. By default LILO
  1427.   will boot the operating system listed first in the configuration file,
  1428.   which in this case is Linux. In order to bring up a boot menu, in
  1429.   order to select another operating system, hold down shift or ctrl
  1430.   while the system boots; you should see a prompt such as
  1431.  
  1432.        Boot:
  1433.  
  1434.  
  1435.   Here, enter either the name of the operating system to boot (given by
  1436.   the label line in the configuration file; in this case, either linux
  1437.   or msdos), or press tab to get a list.
  1438.  
  1439.   Now let's say that you want to use LILO as the secondary boot loader;
  1440.   if you want to boot Linux from OS/2's Boot Manager, for example.  In
  1441.   order to boot a Linux partition from OS/2 Boot Manager, unfortunately,
  1442.   you must create the partition using OS/2's FDISK (not Linux's), and
  1443.   format the partition as FAT or HPFS, so that OS/2 knows about it.
  1444.   (That's IBM for you.)
  1445.  
  1446.   In order to have LILO boot Linux from OS/2 Boot Manager, you only want
  1447.   to install LILO on your Linux root filesystem (in the above example,
  1448.   /dev/hda2). In this case, your LILO config file should look something
  1449.   like:
  1450.  
  1451.  
  1452.        boot = /dev/hda2
  1453.        install = /boot/boot.b
  1454.        compact
  1455.  
  1456.        image = /vmlinuz
  1457.          label = linux
  1458.          root = /dev/hda2
  1459.          vga = ask
  1460.  
  1461.   Note the change in the boot line. After running /sbin/lilo you should
  1462.   be able to add the Linux partition to Boot Manager. This mechanism
  1463.   should work for boot loaders used by other operating systems as well.
  1464.  
  1465.  
  1466.   6.  Miscellaneous
  1467.  
  1468.   I don't like to be biased towards the Slackware release, however, in
  1469.   order to document multiple releases of Linux, this file would be much,
  1470.   much longer. It is simpler and more coherent to cover the specific
  1471.   instructions for a single release of Linux. The book Linux
  1472.   Installation and Getting Started currently includes general
  1473.   installation instructions which should be applicable to ``any''
  1474.   distribution of Linux. However, because the installation procedures
  1475.   are so varied, covering them all would be very confusing both to
  1476.   myself and to the reader.
  1477.  
  1478.   The basic concepts in this document still hold, no matter what release
  1479.   of Linux you choose. For example, all releases require you to run
  1480.   fdisk, and all of them (to my knowledge) include some kind of
  1481.   installation menu similar to the setup program.  If you choose to use
  1482.   a release of Linux other than Slackware, the READMEs and installation
  1483.   instructions that come with that release should be easy to understand
  1484.   in the context of the material presented here.
  1485.  
  1486.   If you would like a more complete discussion of Linux installation
  1487.   (instead of the "quick" examples given here), read the book Linux
  1488.   Installation and Getting Started, from sunsite.unc.edu in
  1489.   /pub/Linux/docs/LDP.  This book includes a complete discussion of how
  1490.   to obtain and install Linux, as well as a basic UNIX and systems
  1491.   administration tutorial for new users.
  1492.  
  1493.   Please mail me at mdw@sunsite.unc.edu if any part of this document is
  1494.   confusing or incorrect. I depend on feedback from readers in order to
  1495.   maintain this document! I also like to help answer questions about
  1496.   Linux installation, if you have any.
  1497.  
  1498.   I'd like to thank Patrick Volkerding for his work on the Slackware
  1499.   distribution and assistance in preparing this document.
  1500.  
  1501.   Best of luck with your new Linux system!
  1502.  
  1503.   Cheers, mdw
  1504.  
  1505.